1. Field of the Invention
The present invention is generally directed to computing systems. More particularly, the present invention is directed to an architecture for unifying the computational components within a computing system.
2. Background Art
The desire to use a graphics processing unit (GPU) for general computation has become much more pronounced recently due to the GPU's exemplary performance per unit power and/or cost. The computational capabilities for GPUs, generally, have grown at a rate exceeding that of the corresponding central processing unit (CPU) platforms. This growth, coupled with the explosion of the mobile computing market and its necessary supporting server/enterprise systems, has been used to provide a specified quality of desired user experience. Consequently, the combined use of CPUs and GPUs for executing workloads with data parallel content is becoming a volume technology.
However, GPUs have traditionally operated in a constrained programming environment, available only for the acceleration of graphics. These constraints arose from the fact that GPUs did not have as rich a programming ecosystem as CPUs. Their use, therefore, has been mostly limited to two dimensional (2D) and three dimensional (3D) graphics and a few leading edge multimedia applications, which are already accustomed to dealing with graphics and video application programming interfaces (APIs).
With the advent of multi-vendor supported OpenCL® and DirectCompute®, standard APIs and supporting tools, the limitations of the GPUs in traditional applications has been extended beyond traditional graphics. Although OpenCL and DirectCompute are a promising start, there are many hurdles remaining to creating an environment and ecosystem that allows the combination of the CPU and GPU to be used as fluidly as the CPU for most programming tasks.
Existing computing systems often include multiple processing devices. For example, some computing systems include both a CPU and a GPU on separate chips (e.g., the CPU might be located on a motherboard and the GPU might be located on a graphics card) or in a single chip package. Both of these arrangements, however, still include significant challenges associated with (i) separate memory systems, (ii) efficient scheduling, (iii) providing quality of service (QoS) guarantees between processes, (iv) programming model, and (v) compiling to multiple target instruction set architectures (ISAs)—all while minimizing power consumption.
For example, the discrete chip arrangement forces system and software architects to utilize chip to chip interfaces for each processor to access memory. While these external interfaces (e.g., chip to chip) negatively affect memory latency and power consumption for cooperating heterogeneous processors, the separate memory systems (i.e., separate address spaces) and driver managed shared memory create overhead that becomes unacceptable for fine grain offload.
In another example, some commands cannot execute on a GPU efficiently. For example, a GPU cannot effectively execute commands which involve an operating system (“OS”) such as, for example, instructions that allocate memory or printing data to a computer screen can only be processed using a CPU. Because the GPU cannot perform these tasks, the GPU makes a request to the CPU to perform those tasks. These requests are known as system calls (syscalls).
Syscalls are expensive for the CPU to process. Often, syscalls are high-priority commands that require CPU's immediate attention. Each time the CPU receives a syscall request, the CPU stops processing its current processes, invokes the OS, processes the syscall, and then returns to processing its work.
When a GPU processes a wavefront, each work item can require a syscall for memory allocation or other instructions that the GPU cannot process (or cannot process readily). In a conventional system, a GPU makes a separate syscall request to the CPU for each work item. Because the work items execute in parallel, each work item makes the same syscall request to the CPU.
Each time a syscall request arrives to the CPU, the CPU stops processing its work, invokes the OS, processes the GPU's request, and returns to processing its own work. When multiple work items make separate syscall requests at the same time, the CPU wastes processing time as repeatedly pauses its own work, invokes the OS and attempts to processes syscall requests from the GPU.